package com.atguigu.gulimall.ware.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author lirl
 * @date 2021/2/5 22:13
 */
@Configuration
//@EnableTransactionManagement 可以不用写默认开启
//@MapperScan("com.atguigu.gulimall.product.dao") 可以不用写
public class MybatisConfig {

    /**
     * mybatisPlus分页插件配置
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){

        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
       // paginationInterceptor.setDbType()
        return  paginationInterceptor;

    }

}
